package ezxpns.types;

import java.util.*;

public class VPath implements Value<VPath>
{
	private ArrayList<String> value;
	public VPath(ArrayList<String> value2)
	{
		value=new ArrayList<String>();
		for( String v : value2 ) value.add(v);
	}
	public int compareTo(VPath other)
	{
		Iterator<String> i1=value.iterator();
		Iterator<String> i2=value.iterator();
		while( i1.hasNext() && i2.hasNext() )
		{
			String v1=i1.next();
			String v2=i2.next();
			int c=v1.compareTo(v2);
			if( c!=0 ) return c;
		}
		return (i1.hasNext()?1:0)-(i2.hasNext()?1:0);
	}
	public VPath copy()
	{
		return new VPath(value);
	}
	public ArrayList<String> value()
	{
		return copy().value;
	}
}
